const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports={
entry:"./认识ts.js",
output:{
//path:__dirname,
path: path.resolve(__dirname, "dist"),
filename:'bundle.js'
},
resolve:{
extensions:['.tsx','.ts','.js']
},
module:{
	rules: [{
		test: /\.tsx?$/,
		use: 'ts-loader',
		exclude: /node_modules/
	}]
},
plugins:[
    new HtmlWebpackPlugin({
    template:'./web/js/index.html'
    })
    ],
    devServer:{
        contentBase:"./bundle",//根目录
        open:true,//自动打开浏览器
        port:8080
        }
    
}